<?php
  include( 'class.php' );

  $objClass = new testClass();
  echo $objClass->test();

?>

<!DOCTYPE html>
<head>
  <title>JQuery Test</title>
      <script src="/js/jquery.js"></script>
      <script>
        $(function(){
          /*var foo = '';
          var stuffToDo = {
            'bar' : function() {
              console.log('the value was bar -- yay!');
            }, 'baz' : function() {
              console.log('boo baz :(');
            }, 'default' : function() {
              console.log('everything else is just ok');
            }
          };
          //console.log( stuffToDo[ 'baz' ] );
          if ( stuffToDo[foo] ) {
            stuffToDo[foo]();
          } else {
            stuffToDo['default']();
          }*/



          /*var foo = 'world';
          var sayHello = function() {
            var foo = 'hello';
            console.log(foo);
          };
          sayHello(); // logs 'hello'
          console.log(foo);*/ 


          /*(function() {
            var baz = 1;
            var bim = function() { alert(baz); };
            bar = function() { alert(baz); };
          })();
            console.log(baz);
            bar();
            bim();*/

            
            /*var myObject = {
              myFn : function() { console.log( $( this ).html() ); },
            };
            $( '#foo' ).click( myObject.myFn ); // logs DOM element #foo
            $( '#foo1' ).click( $.proxy( myObject, 'myFn' ) ); // logs myObject*/


            /*var myValue = [1, 2, 3];
            console.log( typeof myValue ); // remember always typeof always consider array as an object
            console.log( jQuery.isArray( myValue ) ); // true*/


            /*$('#foo').data( 'keyName', 'test' );
            $('#foo').data( 'keyVal', 'val' );
            $( '#foo').click(function(){
              $( this ).data( 'keyName', $( this).data().keyName + '=test' );
              $( this ).data( 'keyVal', $( this).data().keyVal + '=val' );
              console.log( $('#foo').data() );
            });
            console.log( $('#foo').data() );
            $('#foo1').data( 'name', 'test' );
            $('#foo1').data( 'val', 'val' );
            $( '#foo1').click(function(){
              $( this ).data( 'name', $( this).data().name + '=test' );
              $( this ).data( 'val', $( this).data().val + '=val' );
              console.log( $('#foo1').data() );
            });
            console.log( $('#foo1').data() );*/

        });
      </script>
  <script type="text/javascript">

    $(function(){
        $( 'a' ).on( 'click', function(){
          alert( $( this ).parents( 'ul' ).html() );
        });
    });

  </script>
</head>
<body>
<a href="javascript:;" id="foo">click here</a>
<a href="javascript:;" id="foo1">click here...</a>

<li>
  <ul rel="one">
    <li><a href="javascript:;" id="foo1">hi</a></li>
    <li><a href="javascript:;" id="foo2">bye</a></li>
  </ul>
</li>
<li>
  <ul rel="two">
    <li><a href="javascript:;" id="foo3">hi</a></li>
    <li><a href="javascript:;" id="foo4">bye</a></li>
  </ul>
</li>

</body>
</html>